// 定义key
const TOKENKEY = 'top-line-token'
// 保存token
const savrToken = tokenObj => {
  localStorage.setItem(TOKENKEY, JSON.stringify(tokenObj))
}
// 删除token
const removeToken = () => {
  localStorage.removeItem(TOKENKEY)
}
// 读取token
const getToken = () => {
  return JSON.parse(localStorage.getItem(TOKENKEY))
}
// 暴露出去
export { savrToken, removeToken, getToken }
